home *** CD-ROM | disk | FTP | other *** search
/ Amiga Aktuell / Amiga Aktuell.iso / amiga-aktuell / net tools / tcp tools / cdxnetl_1b7 / install < prev    next >
Text File  |  1996-09-05  |  9KB  |  308 lines

  1. ;; $VER: Install_cdxNetLaunch 1.0 (20.5.1995)
  2. ;;
  3. ;; Install cdxNetLaunch to target system
  4. ;; (c)1996 by Hans Bühler, Codex Design Software
  5. ;;    codex@studi.mathematik.hu-berlin.de
  6. ;; ============================================
  7. ;;
  8. ;; TABSIZE = 3
  9.  
  10.  
  11. ;; ============================================
  12.  
  13. (set @default-dest    "SYS:Commodities")
  14. (set @pretend            0)
  15. (set @user-level        2)
  16. (set #docdir            "HELP:")
  17. (set #defPrefsDir        "S:cdxNetLaunch")
  18. (set #prefsdir            #defPrefsDir)                ;; if == #defPrefsDir, it will be created !
  19.  
  20. ;; where to find what
  21. (set #localprefsdir    "cdxData")
  22. (set #localdir            "")
  23. (set #localguideName    "doc/cdxNetLaunch.guide")
  24. (set #localCdxName    "cdxNetLaunch")
  25. (set #netdir            "DEVS:networks")            ;; directory of network devices
  26.  
  27. ;; other strings
  28. (set s_OtherDir        "Other directory")
  29.  
  30. ;; ============================================ HELLO
  31.  
  32. (welcome    "·C·O·D·E·X· ·D·E·S·I·G·N· ·S·O·F·T·W·A·R·E·\n"
  33.             "presents:\n"
  34.             "\n"
  35.             "cdxNetLaunch V1.00.ß\n"
  36.             "\n"
  37.             "Welcome to its installation utility !\n")
  38.  
  39. ;; ============================================ FIND AMITCP (SYSTEM)
  40.  
  41. (if (= 0 (exists "AmiTCP:bin" (noreq)))
  42.     (    (abort    "Error !\n"
  43.                     "\n"
  44.                     "Can't find AmiTCP/IP !!!\n"
  45.                     "You need AmiTCP/IP to make use of this program !"
  46.         )
  47.     )
  48. )
  49.  
  50. ;; ============================================ LOOP 1 !!
  51.  
  52. (set Confirmed 0)
  53.  
  54. (until (= Confirmed 1)
  55. (
  56.     ;; ============================================ SELECT PROGRAM DESTINATION
  57.  
  58.     (if (NOT (askbool        (prompt    "The installer will copy cdxNetLaunch to your\n"
  59.                                             @default-dest " directory.\n"
  60.                                             "\n"
  61.                                             "Is that okay for you ?")
  62.                                 (help        "If you don't want to copy cdxNetLaunch to "
  63.                                             @default-dest ", select \"" s_OtherDir "\" in order "
  64.                                             "to choose another target directory !\n"
  65.                                             "No other files will be copied there thus you don't need "  
  66.                                             "to create a new directory for cdxNetLaunch itself, I think.")
  67.                                 (default 1)
  68.                                 (choices "Yes" s_OtherDir)
  69.                 )    )
  70.         (
  71.             (set @default-dest (askdir
  72.                                 (prompt    "Where should I copy cdxNetLaunch to ?\n"
  73.                                             "(NO NEW DIRECTORY WILL BE CREATED !!)")
  74.                                 (help        "Select a directory from where you want to start "
  75.                                             "cdxNetLaunch, later.\n"
  76.                                             "Choose SYS:WbStartup/ if you want to start "
  77.                                             "cdxNetLaunch automatically.\n"
  78.                                             "\n"
  79.                                             @askdir-help)
  80.                                 (default    @default-dest)
  81.                                 (newpath)
  82.                                 )
  83.             )
  84.         )
  85.     )
  86.  
  87.     (complete 10)
  88.  
  89.     ;; ============================================ SELECT PREFS DIR
  90.  
  91.     (if (NOT (askbool        (prompt    "cdxNetLaunch need a directory where it can save its "
  92.                                             "preferences files to.\n"
  93.                                             "Since there will be several files saved to this directory "
  94.                                             "it would be the best that you create a new one !\n"
  95.                                             "\n"
  96.                                             "By default, the installation script would "
  97.                                             "create a directory " #prefsdir ".\n"
  98.                                             "\n"
  99.                                             "Is that okay for you ?")
  100.                                 (help        "If you want that cdxNetLaunch saves its files to " #prefsdir ","
  101.                                             "click at \"Yes\", otherwise click at \"" s_OtherDir "\" and"
  102.                                             "a directory-requester will enable you to choose another "
  103.                                             "directory.\n"
  104.                                             "You can even create directories from there !")
  105.                                 (default 1)
  106.                                 (choices "Yes" s_OtherDir)
  107.                 )    )
  108.         (
  109.             (set #prefsdir (askdir
  110.                                 (prompt    "Where do you want to save the preferences files of cdxNetLaunch to ?\n"
  111.                                             "(NO NEW DIRECTORY WILL BE CREATED !!!!)")
  112.                                 (help        "Please select a target directory for the preferences files cdxNetLaunch will "
  113.                                             "create.\n"
  114.                                             "It is possible (and recommended) to select a directory which is already been used by "
  115.                                             "a former version of cdxNetLaunch.\n"
  116.                                             "\n"
  117.                                             "Please note that cdxNetLaunch WON'T create a new sub-directory in the "
  118.                                             "directory you selected so please create one using this Installer "
  119.                                             "session !\n"
  120.                                             "\n"
  121.                                             @askdir-help)
  122.                                 (default    @default-dest)
  123.                                 (newpath)
  124.                                 (disk))
  125.             )
  126.         )
  127.     )
  128.  
  129.     (complete 20)
  130.  
  131.     ;; ============================================ SELECT GUIDE DIR
  132.  
  133.     (set xAskDoc 0)
  134.  
  135.     (if (<> 0 (exists #docdir) )
  136.         (
  137.             (set xAskDoc (askbool
  138.                                 (prompt    "Do you want to copy the file cdxNetLaunch.guide to "
  139.                                             "the standard helpfiles-directory " #docdir "?")
  140.                                 (help        "The installation script will copy the guide for cdxNetLaunch "
  141.                                             "to" #docdir " if you don't like to choose another directory for "
  142.                                             "that documentation file.")
  143.                                 (default 1)
  144.                                 (choices "Yes" s_OtherDir)
  145.                              )
  146.             )
  147.         )
  148.         (
  149.             (set #docdir @default-dest)        ;; if no HELP:, copy to default dest !
  150.         )
  151.     )
  152.  
  153.     (if (= xAskDoc 0)
  154.         (
  155.             (set #docdir (askdir
  156.                                 (prompt    "Where you do you want to copy the documentation file "
  157.                                             "\"cdxNetLaunch.guide\" to ?\n"
  158.                                             "(NO NEW DIRECTORY WILL BE CREATED !)")
  159.                                 (help        "Select any directory where you want to copy the "
  160.                                             "documentation to (guidefile means AmigaGuide-formatted "
  161.                                             "file).\n"
  162.                                             "\n"
  163.                                             @askdir-help)
  164.                                 (default @default-dest)
  165.                                 (newpath)
  166.                              )
  167.             )
  168.         )
  169.     )
  170.  
  171.     (complete 30)
  172.  
  173.     ;; ============================================ WHERE TO COPY ADD SOFTWARE ?
  174.  
  175.     (complete 50)
  176.  
  177.     ;; ============================================ LET USER CONFIRM INPUT
  178.  
  179.     (if (> @user-level 0)
  180.         (
  181.             (set Confirmed (askbool
  182.                                 (prompt    "Please confirm your choices:\n"
  183.                                             "\n"
  184.                                             "Copy cdxNetLaunch to \"" @default-dest "\"\n"
  185.                                             "Copy guide to: \"" #docdir "\"\n"
  186.                                             "Preferences dir: \"" #prefsDir "\"\n"
  187.                                             "\n"
  188.                                             "Is that correct ?")
  189.                                 (help        "Please check your choices.\n"
  190.                                             "Choose \"" No "\" to change them.")
  191.                                 (default    1)
  192.                               )
  193.             )
  194.         )
  195.         (
  196.             (set Confirmed 1)
  197.         )
  198.     )
  199. ))            ;; Until (= confirmed 1)
  200.  
  201. (complete 60)
  202.  
  203. ;; ============================================ check environment
  204.  
  205. (complete 65)
  206.  
  207. ;; ============================================ Copy program
  208. ;; ============================================ Copy program
  209. ;; ============================================ Copy program
  210.  
  211. ;; ============================================ Create prefsdir & copy def prefs ?
  212.  
  213. (if (NOT (exists (#prefsdir (noreq))))
  214.     (
  215.         (makedir    #prefsdir
  216.                     (prompt    "Creating preferences directory '" #prefsdir "'...")
  217.                     (help        "I'll make a directory for my prefs ;-)")
  218.         )
  219.      )
  220. )
  221.  
  222. (copyfiles    (prompt    "Copying default preferences files & modules...")
  223.                 (help        "These default files are preferences for applications that _belong_ "
  224.                             "to AmiTCP/IP.\n"
  225.                             "cdxNetLaunch needs the information that these files are neccessary "
  226.                             "for AmiTCP/IP and shouldn't be influenced by it.\n"
  227.                             "Read the relating chapter \"Usage/New Application Window\" in the "
  228.                             "guide !!\n"
  229.                             "\n"
  230.                             @copyfiles-help)
  231.                 (source    #localprefsdir)
  232.                 (dest        #prefsdir)
  233.                 (all)
  234.                 (optional    "nofail" "askuser")
  235. )
  236.  
  237. (complete 70)
  238.  
  239. ;; ============================================ Copy guide
  240.  
  241. (copyfiles    (prompt    "Copying cdxNetLaunch.guide to" #docdir "...")
  242.                 (help        @copyfiles-help)
  243.                 (source    #localguideName)
  244.                 (dest        #docdir)
  245.                 (files)
  246.                 (infos)
  247.                 (optional "force")
  248. )
  249.  
  250. (complete 80)
  251.  
  252. ;; ============================================ change tooltypes & copy main
  253.  
  254. (copyfiles    (prompt    "Copying cdxNetLaunch to" @default-dest "...")
  255.                 (help        @copyfiles-help)
  256.                 (source    #localCdxName)
  257.                 (dest        @default-dest)
  258.                 (files)
  259.                 (infos)
  260.                 (optional "force")
  261. )
  262.  
  263. (complete 85)
  264.  
  265. ;; set tooltypes
  266.  
  267. (tooltype    (prompt    "Adjusting tooltypes of cdxNetLaunch...")
  268.                 (help        "I gonna store your settings into the icon of cdxNetLaunch so that "
  269.                             "the program can find its preferences and stuff.")
  270.                 (dest        (tackon @default-dest #localCdxName))
  271.                 (settooltype "PREFSDIR" #prefsdir)
  272.                 (settooltype "AMIGAGUIDEFILE" (tackon #docdir #localguideName))
  273.                 (noposition)
  274. )
  275.  
  276. (complete 90)
  277.  
  278. ;; ============================================ copy libs
  279.  
  280. (copylib    (prompt    "Copying libraries...")
  281.             (help        "These libraries are needed to run cdxNetLaunch !")
  282.             (source    "libs/gadtoolsbox.library")
  283.             (dest        "libs:")
  284.             (optional "nofail" "askuser")
  285. )
  286.  
  287. (copylib    (prompt    "Copying libraries...")
  288.             (help        "These libraries are needed to run cdxNetLaunch !")
  289.             (source    "libs/nofrag.library")
  290.             (dest        "libs:")
  291.             (optional "nofail" "askuser")
  292. )
  293.  
  294. (complete 95)
  295.  
  296. ;; ============================================ Run program
  297. ;; ============================================
  298. ;; ============================================
  299.  
  300.  
  301. (exit    "cdxNetLaunch is now ready to run.\n"
  302.     "Please run it to configurate it.\n"
  303.     "\n"
  304.     "Thank you very much for using a\n"
  305.     "·C·O·D·E·X· ·D·E·S·I·G·N· ·S·O·F·T·W·A·R·E·\n"
  306.     "production."
  307. )
  308.